//
//  LocationCentral.h
//  playSerengetiMobile1
//
//  Created by Lita Gratrix on 11/5/09.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MapKit/MapKit.h>
#import "Team.h"
#import "SerengetiCLController.h"
#import "playSerengetiMobile1AppDelegate.h"



@interface LocationCentral : UIViewController <UITableViewDelegate, UITableViewDataSource, MKMapViewDelegate> {
	
	UITableView *locationCentralTableView;
	MKMapView *mapView;
	
	NSURLConnection *nearbyLocationsConnection;
	NSMutableData *responseData;
	
	NSMutableArray *nearbyLocations;
	double latitude;
	double longitude;
	
	NSMutableArray *tableSourceArray;
	
	SerengetiCLController *locationController;
	playSerengetiMobile1AppDelegate *appDelegate;

}

@property (nonatomic, retain) IBOutlet UITableView *locationCentralTableView;
@property (nonatomic, retain) IBOutlet MKMapView *mapView;

@property (nonatomic, retain) NSURLConnection *nearbyLocationsConnection;

@property (nonatomic, retain) NSMutableArray *nearbyLocations;

@property (nonatomic, readwrite) double latitude;
@property (nonatomic, readwrite) double longitude;

@property (nonatomic, retain) NSMutableArray *tableSourceArray;

@property (nonatomic, retain) SerengetiCLController *locationController;
@property (nonatomic, retain) playSerengetiMobile1AppDelegate *appDelegate;

- (void)getCurrentLocation;
- (void)getNearbyLocations;
- (void)populateNearbyLocations:(NSDictionary *)nearbyLocationsArray;
- (Team *)populateTeamOwner:(NSDictionary *)teamDic;

- (void)setupMapView;

@end
